import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: Administrator
 * Data: 2023 - 06 - 05
 * Time: 19:27
 */
public class Practice {
    public static void main(String[] args) {
        List<Integer> list1 = new LinkedList<>();
        list1.add(1);
        list1.add(2);
        list1.add(3);
        List<Integer> list2 = new ArrayList<>(list1);//创建list2对象时，将list1的内容拷贝到list2中
        list2.add(100);
        System.out.println(list2);
    }
}
